﻿using System;
using EmbeddedSharp.Core;
using WeifenLuo.WinFormsUI.Docking;
using System.Collections.Generic;

namespace Zove.Desktop.Function
{
    public partial class FunctionsView : DockContent
    {
        public FunctionsView()
        {
            InitializeComponent();

            this.Load +=new EventHandler(FunctionsView_Load);
        }

        public void FunctionsView_Load(object sender, EventArgs args)
        {
            List<string> keys = new List<string>();

            foreach (string key in
                DefaultDependencyManager.Instance.FunctionManager.Functions.Keys)
            {
                keys.Add(key);
            }

            keys.Sort();
            foreach (string key in keys)
            {
                this.lbFunctions.Items.Add(key);
            }
        }
    }
}
